package com.android.friend.example.widget;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Toast;

import com.android.friend.app.R;
import com.android.friend.lib.dialog.BaseDialogNoTitle;
import com.android.friend.lib.widget.EditTextWithDrawableClick;
import com.android.friend.lib.widget.EditTextWithDrawableClick.DrawableClickListener;

public class EditTextDrawableClickDialog extends BaseDialogNoTitle{

	public EditTextDrawableClickDialog(Context context) {
		super(context);
	}

	@Override
	protected int getContentResId() {
		return R.layout.edit_with_drawable_layout;
	}

	@Override
	protected void initContentView(LayoutInflater inflater, View contentView) {
		EditTextWithDrawableClick editSearch = (EditTextWithDrawableClick)contentView.findViewById(R.id.edtSearch);
		editSearch.setDrawableClickListener(new DrawableClickListener(){

			@Override
			public void onDrawableClick(DrawablePosition target) {
				Toast.makeText(getContext(), target.name(), Toast.LENGTH_SHORT).show();
			}
			
		});
	}

}
